Skip to content

added support for managed cognitive service#5444

Closed
prachify wants to merge 2 commits intomicrosoft:mainfrom
prachify:managed_cognitive_service_reverseProxy
Closed

added support for managed cognitive service#5444
prachify wants to merge 2 commits intomicrosoft:mainfrom
prachify:managed_cognitive_service_reverseProxy

Conversation

@prachify
Copy link
Copy Markdown
Contributor

@prachify prachify commented Mar 12, 2025

Changelog Entry

Added

Description

There are three ways for authenticating with Azure Cognitive Service, 1) using the api-key, 2) using the authorization-token 3) using Entra Auth. Since the proxy is terminating the client call and opening up another session to Azure Cognitive Service, we do not risk exposure of the Azure Cognitive Service api-keys to the untrusted user, we will be using the API-Key already present in Vault when we call the Azure Cognitive Service from the Proxy.

Design

Introduced a new optional parameter, managedCognitiveService, in createCognitiveServicesSpeechServicesPonyfillFactory.ts.
Allows routing network requests through a managed cognitive service.

Specific Changes

If managedCognitiveService is provided:

  • window.fetch is replaced with an intercepted version using createInterceptedFetch.
  • window.WebSocket is replaced using createInterceptedWebSocket.

-

  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@prachify prachify closed this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant